1. Field of the Invention
The present invention relates to an electronic device such as an electronic calculator or IC card which has a calendar function (the function of counting and displaying the year, month and date (including the day of the week)) and which can be energized by an external power source or a built-in battery.
2. Description of the Related Art
Recently, with the development of microcomputers, various card-like calculators or IC cards have been developed. Some of the desk calculators and IC cards have a time counting or calendar function. For example, European Patent Publication No. EP 0 167 044 (inventor: K. Rikuna et al.), discloses an intelligent card which realizes the calendar function by hardware. However, since the calendar function of the above intelligent card is realized by a complete set of hardware circuits, the circuit arrangement becomes complex to adjust the month count depending on the number of days of the month, and the date count depending on the leap year. Therefore, the chip size is increased, which is undesirable for a thin card-like calculator or the IC card.
The calendar data may also be updated by soft-ware. In this case, each time the date data is changed, the calendar data stored in a memory are read out. The calendar data is incremented by "1" to be updated. The updated calendar data are rewritten in the memory. In order to update the calendar data as described above, it is necessary to automatically turn on the power source once a day so as to operate the CPU which in turn updates calendar data. Therefore, even if a user does not use the card-like calculator or IC card, the device itself regularly operates, thus dissipating the power of the built-in battery. As a result, the service life of a capacity-limited built-in battery used in the card-like calculator or IC card is undesirably shortened.